package com.suqiu.controller;


import com.suqiu.entity.User;
import com.suqiu.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author suqiu
 * @since 2021-12-14
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Resource
    private UserService userService;

    @GetMapping("/getHello")
    public String getHello() {
        User user = new User();
        user.setName("素秋");
        user.setAge(12);
        user.setScore(12);
        user.setIsDelete(0);
        userService.save(user);

        return "Hello Suqiu";
    }
}

